3.136 \(\int \frac {\sin ^2(a+b x^n)}{x} \, dx\)

Optimal. Leaf size=43 \[ -\frac {\cos (2 a) \text {Ci}\left (2 b x^n\right )}{2 n}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2} \]

[Out]

-1/2*Ci(2*b*x^n)*cos(2*a)/n+1/2*ln(x)+1/2*Si(2*b*x^n)*sin(2*a)/n

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3425, 3378, 3376, 3375} \[ -\frac {\cos (2 a) \text {CosIntegral}\left (2 b x^n\right )}{2 n}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x^n]^2/x,x]

[Out]

-(Cos[2*a]*CosIntegral[2*b*x^n])/(2*n) + Log[x]/2 + (Sin[2*a]*SinIntegral[2*b*x^n])/(2*n)

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3425

Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\sin ^2\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac {1}{2 x}-\frac {\cos \left (2 a+2 b x^n\right )}{2 x}\right ) \, dx\\ &=\frac {\log (x)}{2}-\frac {1}{2} \int \frac {\cos \left (2 a+2 b x^n\right )}{x} \, dx\\ &=\frac {\log (x)}{2}-\frac {1}{2} \cos (2 a) \int \frac {\cos \left (2 b x^n\right )}{x} \, dx+\frac {1}{2} \sin (2 a) \int \frac {\sin \left (2 b x^n\right )}{x} \, dx\\ &=-\frac {\cos (2 a) \text {Ci}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 37, normalized size = 0.86 \[ \frac {-\cos (2 a) \text {Ci}\left (2 b x^n\right )+\sin (2 a) \text {Si}\left (2 b x^n\right )+n \log (x)}{2 n} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x^n]^2/x,x]

[Out]

(-(Cos[2*a]*CosIntegral[2*b*x^n]) + n*Log[x] + Sin[2*a]*SinIntegral[2*b*x^n])/(2*n)

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 48, normalized size = 1.12 \[ -\frac {\cos \left (2 \, a\right ) \operatorname {Ci}\left (2 \, b x^{n}\right ) + \cos \left (2 \, a\right ) \operatorname {Ci}\left (-2 \, b x^{n}\right ) - 2 \, n \log \relax (x) - 2 \, \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x^{n}\right )}{4 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="fricas")

[Out]

-1/4*(cos(2*a)*cos_integral(2*b*x^n) + cos(2*a)*cos_integral(-2*b*x^n) - 2*n*log(x) - 2*sin(2*a)*sin_integral(
2*b*x^n))/n

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin \left (b x^{n} + a\right )^{2}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="giac")

[Out]

integrate(sin(b*x^n + a)^2/x, x)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 45, normalized size = 1.05 \[ \frac {\ln \left (b \,x^{n}\right )}{2 n}+\frac {\Si \left (2 b \,x^{n}\right ) \sin \left (2 a \right )}{2 n}-\frac {\Ci \left (2 b \,x^{n}\right ) \cos \left (2 a \right )}{2 n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*x^n)^2/x,x)

[Out]

1/2/n*ln(b*x^n)+1/2*Si(2*b*x^n)*sin(2*a)/n-1/2*Ci(2*b*x^n)*cos(2*a)/n

________________________________________________________________________________________

maxima [C]  time = 3.10, size = 100, normalized size = 2.33 \[ -\frac {{\left ({\rm Ei}\left (2 i \, b x^{n}\right ) + {\rm Ei}\left (-2 i \, b x^{n}\right ) + {\rm Ei}\left (2 i \, b e^{\left (n \overline {\log \relax (x)}\right )}\right ) + {\rm Ei}\left (-2 i \, b e^{\left (n \overline {\log \relax (x)}\right )}\right )\right )} \cos \left (2 \, a\right ) - 4 \, n \log \relax (x) - {\left (-i \, {\rm Ei}\left (2 i \, b x^{n}\right ) + i \, {\rm Ei}\left (-2 i \, b x^{n}\right ) - i \, {\rm Ei}\left (2 i \, b e^{\left (n \overline {\log \relax (x)}\right )}\right ) + i \, {\rm Ei}\left (-2 i \, b e^{\left (n \overline {\log \relax (x)}\right )}\right )\right )} \sin \left (2 \, a\right )}{8 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x^n)^2/x,x, algorithm="maxima")

[Out]

-1/8*((Ei(2*I*b*x^n) + Ei(-2*I*b*x^n) + Ei(2*I*b*e^(n*conjugate(log(x)))) + Ei(-2*I*b*e^(n*conjugate(log(x))))
)*cos(2*a) - 4*n*log(x) - (-I*Ei(2*I*b*x^n) + I*Ei(-2*I*b*x^n) - I*Ei(2*I*b*e^(n*conjugate(log(x)))) + I*Ei(-2
*I*b*e^(n*conjugate(log(x)))))*sin(2*a))/n

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {{\sin \left (a+b\,x^n\right )}^2}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x^n)^2/x,x)

[Out]

int(sin(a + b*x^n)^2/x, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin ^{2}{\left (a + b x^{n} \right )}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*x**n)**2/x,x)

[Out]

Integral(sin(a + b*x**n)**2/x, x)

________________________________________________________________________________________